import org.apache.commons.math.util.MathUtils


object demo3 {
  def main(args: Array[String]) {

    implicit def strToInt(x: String) =  Integer.parseInt(x)

    class Container[A <% Int] { def addIt(x: A) = 123 + x }
    (new Container[String]).addIt("123")
  }
  def myfunc[Int](iter: Iterator[Int]) : Iterator[Int] = {
    var res = List[Int]()
    var pre = iter.next
    res ::= pre
    while (iter.hasNext) {
      pre = iter.next


    }
    res::Nil
    res.iterator
  }
}
